<div class="layui-card-body">
    <form class="layui-form" action="{:url()}" style="width: 500px;" method="post">
        <input type="hidden" name="tag_id" value="{$tag_id|default=''}">
        <blockquote class="layui-elem-quote">请检查好菜单再生成!本操作大约要用时一分钟,请等待</blockquote>
    </form>

</div>
<link rel="stylesheet" href="https://cdn.weibuyun.com/static/admin/plugins/formSelects-v4.css">

<script type="text/javascript">
    layui.use(['form', 'layer', 'formSelects', 'upload'], function () {
        var form = layui.form
            , formSelects = layui.formSelects
            , $ = layui.$
            , upload = layui.upload;
        //执行实例
        var uploadInst = upload.render({
            elem: '#test1',
            url: '{:url("/file/upload",["type"=>"image"])}',
            done: function (res) {
                var input = '#test1';
                $(input).closest('.avatar-add').find('.loading').hide();
                if (res.code == 0) {
                    $(input).closest('.avatar-add').find('img').attr('src', res.data.src);
                    $('#img').val(res.data.src);
                } else {
                    layer.msg(res.msg);
                }
            }

        });

    });
</script>






